<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php $model = $this->data['model']; ?>
<h1>База данных по моторам</h1>
<div class="rcbase_content">
	<div style="text-align:right;">
		<a href="/?option=com_rcbase&view=motor&task=addmotor">Добавить новый</a>
	</div>

	<table class="table">
		<tr>
			<th>Мотор</th>
			<th>KV</th>
			<th>Вес, г.</th>
			<th>Ток, А</th>
			<th>Напр., В</th>
			<th>Инфо</th>
		</tr>
		<?php foreach ($model->getMotorList() as $row): ?>
			<tr>
				<td><a href="/?option=com_rcbase&view=motor&task=motor&id=<?= $row['id'] ?>"><?= $row['title'] ?></a></td>
				<td align="right"><?= $row['kv'] ?></td>
				<td align="right"><?= $row['weight'] ?></td>
				<td align="right"><?= $row['max_current'] ?></td>
				<td align="right"><?= $row['max_voltage'] ?></td>
				<td><?= $row['product_id'] ?></td>
			</tr>
		<?php endforeach; ?>
	</table>
</div>